import { createApp } from 'vue'
import App from './App.vue'
import router from './router'
import locale from 'element-plus/es/locale/lang/zh-cn'
import mitt from 'mitt'
import store from '@/store/index'
// Vuetify
import '@mdi/font/css/materialdesignicons.css'
import 'vuetify/styles'
import { createVuetify } from 'vuetify'
import * as components from 'vuetify/components'
import * as directives from 'vuetify/directives'
import '@/assets/style/global.scss'

// ElementPlus
import ElementPlus from 'element-plus'
import 'element-plus/dist/index.css'

const vuetify = createVuetify({
  components,
  directives
})
const app = createApp(App)
app.config.globalProperties.TEduBoard = (window as any).TEduBoard
app.use(vuetify)
app.use(router)
app.use(store)
app.config.globalProperties.$mittBus = mitt()
app.use(ElementPlus, { locale })
app.mount('#app')
